/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nc.solutions.rentacar.domain;

import com.nc.solutions.rentacar.domain.car.ICar;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author I
 */
public class ClassOfCar implements IClassOfCar{

    private String name;
    private long id;
    private List<ICar> listCar = new ArrayList<ICar>();
    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String value) {
        this.name = value;
    }

    @Override
    public void addCar(ICar car) {
        listCar.add(car);
    }

    @Override
    public ICar getCar(int index) {
        return listCar.get(index);
    }

    @Override
    public void deleteCar(int index) {
        listCar.remove(index);
    }

    @Override
    public long getID() {
        return id;
    }

    @Override
    public void setID(long value) {
        this.id = value;
    }
    
}
